import http from "@/utils/http";
import { bodyToQuery } from "@/utils/helper";
import type { StoreManageParamsType } from "./params";
import type { StoreManageResponseData } from "./res";
import { headerCommon, headerMaster } from "../header";

// 标准写法
enum API {
  GET_STOREMANAGE_API = "/1.1/classes/storeManage",
  POST_STOREADD_API = "/1.1/classes/storeManage",
}

// example
//获取仓库管理列表
export const getStoreManegeApi = (data: StoreManageParamsType) =>
  http.get<any, StoreManageResponseData>(API.GET_STOREMANAGE_API, {
    data,
    headers: headerCommon,
  });

//新增仓库管理
export const postStoreAddApi = (data: StoreManageParamsType) =>
  http.post<any, StoreManageResponseData>(API.POST_STOREADD_API, {
    data,
    headers: headerMaster,
  });